home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / pdox693.zip / TI373.ASC < prev    next >
Text File  |  1992-09-09  |  2KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Paradox                                NUMBER  :  373
  9.   VERSION  :  All
  10.        OS  :  DOS
  11.      DATE  :  September 9, 1992                        PAGE  :  1/2
  12.  
  13.     TITLE  :  Creating a Non-Abbreviated Month Text Field
  14.  
  15.  
  16.  
  17.  
  18.   Intended Audience:
  19.   This Technical Information sheet is intended to be used by
  20.   persons with a moderate level of Paradox knowledge.  Some
  21.   knowledge of PAL is useful.
  22.  
  23.   Prerequisites:
  24.   A moderate level of Paradox knowledge.  Some previous experience
  25.   with PAL is helpful.
  26.  
  27.   Purpose:
  28.   The following PAL script scans a table named "tbl", extracts the
  29.   month of the year from a date field and assigns the corresponding
  30.   non-abbreviated month to an alphanumeric field named "Month".
  31.  
  32.  
  33.   EDIT "tbl"              ; Edits the table named "tbl"
  34.     SCAN                  ; Scans every record in the table
  35.       d=[Date]            ; Assigns the value in the field named
  36.                           ;    Date to the variable d
  37.       m=MOY(d)            ; Assigns the month of the year as a
  38.                           ;    string (i.e. Jan, Feb, Mar etc.)
  39.                           ;    to the variable m
  40.  
  41.       SWITCH
  42.         CASE m = "Jan": [Month] = "January"
  43.         CASE m = "Feb": [Month] = "February"
  44.         CASE m = "Mar": [Month] = "March"
  45.         CASE m = "Apr": [Month] = "April"
  46.         CASE m = "May": [Month] = "May"
  47.         CASE m = "Jun": [Month] = "June"
  48.         CASE m = "Jul": [Month] = "July"
  49.         CASE m = "Aug": [Month] = "August"
  50.         CASE m = "Sep": [Month] = "September"
  51.         CASE m = "Oct": [Month] = "October"
  52.         CASE m = "Nov": [Month] = "November"
  53.         CASE m = "Dec": [Month] = "December"
  54.      ENDSWITCH
  55.  
  56.     ENDSCAN
  57.  
  58.   For additional information on PAL, refer to the PAL Reference
  59.   Guide (for versions earlier than 4.0, refer to the PAL User's
  60.   Guide).
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  Paradox                                NUMBER  :  373
  75.   VERSION  :  All
  76.        OS  :  DOS
  77.      DATE  :  September 9, 1992                        PAGE  :  2/2
  78.  
  79.     TITLE  :  Creating a Non-Abbreviated Month Text Field
  80.  
  81.  
  82.  
  83.  
  84.   DISCLAIMER: You have the right to use this technical information
  85.   subject to the terms of the No-Nonsense License Statement that
  86.   you received with the Borland product to which this information
  87.   pertains.
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.